package com.ithema.b2b.goodsprovider.dao;

import model.Userorder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderDao {

    /**
     * 返回uid的所有订单记录
     * @param uid
     * @return
     */
    List<Userorder> getAllorder(@Param(value = "uid")int uid);

    /**
     * 插入一条订单记录
     * @param goodsname
     * @param number
     * @param price
     * @param uid
     * @return
     */
    int insertOrder(@Param(value = "goodsname")String goodsname,
                    @Param(value = "number")int number,
                    @Param(value = "price")int price,
                    @Param(value = "uid")int uid);

}
